Optimal. Leaf size=110 \[ -\frac {96 \sqrt {a+a \cos (c+d x)}}{d^4}+\frac {12 x^2 \sqrt {a+a \cos (c+d x)}}{d^2}-\frac {48 x \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d^3}+\frac {2 x^3 \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3400, 3377,
2718} \begin {gather*} -\frac {96 \sqrt {a \cos (c+d x)+a}}{d^4}-\frac {48 x \tan \left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {a \cos (c+d x)+a}}{d^3}+\frac {12 x^2 \sqrt {a \cos (c+d x)+a}}{d^2}+\frac {2 x^3 \tan \left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {a \cos (c+d x)+a}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
Rule 3400
Rubi steps
\begin {align*} \int x^3 \sqrt {a+a \cos (c+d x)} \, dx &=\left (\sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int x^3 \sin \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx\\ &=\frac {2 x^3 \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}-\frac {\left (6 \sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int x^2 \sin \left (\frac {c}{2}+\frac {d x}{2}\right ) \, dx}{d}\\ &=\frac {12 x^2 \sqrt {a+a \cos (c+d x)}}{d^2}+\frac {2 x^3 \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}-\frac {\left (24 \sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int x \cos \left (\frac {c}{2}+\frac {d x}{2}\right ) \, dx}{d^2}\\ &=\frac {12 x^2 \sqrt {a+a \cos (c+d x)}}{d^2}-\frac {48 x \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d^3}+\frac {2 x^3 \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}+\frac {\left (48 \sqrt {a+a \cos (c+d x)} \csc \left (\frac {1}{2} \left (c+\frac {\pi }{2}\right )+\frac {\pi }{4}+\frac {d x}{2}\right )\right ) \int \sin \left (\frac {c}{2}+\frac {d x}{2}\right ) \, dx}{d^3}\\ &=-\frac {96 \sqrt {a+a \cos (c+d x)}}{d^4}+\frac {12 x^2 \sqrt {a+a \cos (c+d x)}}{d^2}-\frac {48 x \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d^3}+\frac {2 x^3 \sqrt {a+a \cos (c+d x)} \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 53, normalized size = 0.48 \begin {gather*} \frac {2 \sqrt {a (1+\cos (c+d x))} \left (6 \left (-8+d^2 x^2\right )+d x \left (-24+d^2 x^2\right ) \tan \left (\frac {1}{2} (c+d x)\right )\right )}{d^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.08, size = 132, normalized size = 1.20
method | result | size |
risch | \(-\frac {i \sqrt {2}\, \sqrt {a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{2} {\mathrm e}^{-i \left (d x +c \right )}}\, \left (d^{3} x^{3} {\mathrm e}^{i \left (d x +c \right )}+6 i d^{2} x^{2} {\mathrm e}^{i \left (d x +c \right )}-d^{3} x^{3}+6 i d^{2} x^{2}-24 d x \,{\mathrm e}^{i \left (d x +c \right )}-48 i {\mathrm e}^{i \left (d x +c \right )}+24 d x -48 i\right )}{\left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) d^{4}}\) | \(132\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 206 vs.
\(2 (94) = 188\).
time = 0.59, size = 206, normalized size = 1.87 \begin {gather*} -\frac {2 \, {\left (\sqrt {2} \sqrt {a} c^{3} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, {\left (\sqrt {2} {\left (d x + c\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a} c^{2} + 3 \, {\left (\sqrt {2} {\left (d x + c\right )}^{2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, \sqrt {2} {\left (d x + c\right )} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 8 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a} c - {\left (\sqrt {2} {\left (d x + c\right )}^{3} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, \sqrt {2} {\left (d x + c\right )}^{2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, \sqrt {2} {\left (d x + c\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 48 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}\right )}}{d^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{3} \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 98, normalized size = 0.89 \begin {gather*} 2 \, \sqrt {2} \sqrt {a} {\left (\frac {6 \, {\left (d^{2} x^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - 8 \, \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d^{4}} + \frac {{\left (d^{3} x^{3} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - 24 \, d x \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d^{4}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.55, size = 83, normalized size = 0.75 \begin {gather*} -\frac {2\,\sqrt {a\,\left (\cos \left (c+d\,x\right )+1\right )}\,\left (48\,\cos \left (c+d\,x\right )-6\,d^2\,x^2-6\,d^2\,x^2\,\cos \left (c+d\,x\right )-d^3\,x^3\,\sin \left (c+d\,x\right )+24\,d\,x\,\sin \left (c+d\,x\right )+48\right )}{d^4\,\left (\cos \left (c+d\,x\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________